<!doctype html>
<html>

<head>
    <meta charset="UTF-8">
    <title>小学学区划分</title>
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <link href="../../plugins/mui/mui.min.css" rel="stylesheet" />
    <link rel="stylesheet" href="../../css/excutive_housekeeper/school.css" />
    <script src="../../js/statistics.js"></script>
	<script charset="utf-8" src="http://map.qq.com/api/js?v=2.exp"></script>
</head>

<body>
	<header class="mui-bar mui-bar-nav header">
	    <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
	    <h1 class="mui-title" id='title'>中学学区划分</h1>
	</header>
	<div id="container">
	</div>
	<div id="box"></div>
	<!--<div class="search-box clear">
		<div class="input-box">
			<span></span>
			<input id="place" type="text"/ placeholder="请输入地址">
		</div>
		<span class="search-button" id="button">搜索</span>
	</div>-->
	<script src="../../plugins/jquery/jquery-3.1.0.min.js" type="text/javascript" ></script>
	<script src="../../plugins/mui/mui.min.js"></script>
	<script type="text/javascript">
	    mui.init();
	    mui.plusReady(function() {
	        
	    });
	    $(function(){
	    	var center = new qq.maps.LatLng(31.4158393143,119.4845959033);
		    var map = new qq.maps.Map(document.getElementById('container'),{
		        center: center,
		        zoom: 14
		    });
		    //搜索
//		    var searchService = new qq.maps.SearchService({
//		        map : map
//		    });
//		    var button = document.getElementById('button');
//		    button.addEventListener('tap',function(){
//		    	var address = document.getElementById('place').value,
//		    		localtion = '溧阳市';
//	    		searchService.setLocation(localtion);
//  			searchService.search(address);
//		    },false);
		    //软键盘收回
//		    document.getElementById('container').addEventListener('touchstart',function(){
//		    	document.getElementById('place').blur();
//		    },false);
		    //学区划分
		    var path = [
		    //第六中学
		    	[
		    		new qq.maps.LatLng(31.4434927349,119.4526290894),
        			new qq.maps.LatLng(31.4358768293,119.4788503647),
        			new qq.maps.LatLng(31.4274180551,119.4768333435),
        			new qq.maps.LatLng(31.4256969123,119.4812536240),
        			new qq.maps.LatLng(31.4161751264,119.4770908356),
        			new qq.maps.LatLng(31.4160146147,119.4739151001),
        			new qq.maps.LatLng(31.4051872492,119.4709539413),
        			new qq.maps.LatLng(31.4047110788,119.4782495499),
        			new qq.maps.LatLng(31.4009382584,119.4771766663),
        			new qq.maps.LatLng(31.3903515741,119.4785928726),
        			new qq.maps.LatLng(31.3880802268,119.5066595078),
        			new qq.maps.LatLng(31.3824382554,119.5085048676),
        			new qq.maps.LatLng(31.3874207931,119.4557189941)
		    	],
		    	//光华集团
		    	[
		    		new qq.maps.LatLng(31.4468611111,119.4800949097),
			        new qq.maps.LatLng(31.4393553245,119.4819831848),
			        new qq.maps.LatLng(31.4358768293,119.4788503647),
			        new qq.maps.LatLng(31.4274180551,119.4768333435),
			        new qq.maps.LatLng(31.4256969123,119.4812536240),
			        new qq.maps.LatLng(31.4243419479,119.4842147827),
			        new qq.maps.LatLng(31.4278574907,119.4881200790),
			        new qq.maps.LatLng(31.4287729750,119.4922399521),
			        new qq.maps.LatLng(31.4324714406,119.5211219788),
			        new qq.maps.LatLng(31.4469343354,119.4918966293)
		    	],
		    	//燕山教育集团
		    	[
		    		new qq.maps.LatLng(31.4094360476,119.5143842697),
			        new qq.maps.LatLng(31.4207896511,119.4970035553),
			        new qq.maps.LatLng(31.4160469419,119.4954371452),
			        new qq.maps.LatLng(31.4168892939,119.4890642166),
			        new qq.maps.LatLng(31.4224010189,119.4886136055),
			        new qq.maps.LatLng(31.4243419479,119.4842147827),
			        new qq.maps.LatLng(31.4256969123,119.4812536240),
			        new qq.maps.LatLng(31.4161751264,119.4770908356),
        			new qq.maps.LatLng(31.4160146147,119.4739151001),
        			new qq.maps.LatLng(31.4051872492,119.4709539413),
        			new qq.maps.LatLng(31.4047110788,119.4782495499),
        			new qq.maps.LatLng(31.4009382584,119.4771766663),
        			new qq.maps.LatLng(31.3903515741,119.4785928726),
        			new qq.maps.LatLng(31.3880802268,119.5066595078)
		    	],
		    	//第四中学
		    	[	
		    		new qq.maps.LatLng(31.4616878490,119.4836568832),
		    		new qq.maps.LatLng(31.4468611111,119.4800949097),
			        new qq.maps.LatLng(31.4393553245,119.4819831848),
			        new qq.maps.LatLng(31.4358768293,119.4788503647),
			        new qq.maps.LatLng(31.4434927349,119.4526290894),
			        new qq.maps.LatLng(31.4602235843,119.4529724121)
		    	],
		    	//实验教育集团
		    	[
		    		new qq.maps.LatLng(31.4094360476,119.5143842697),
			        new qq.maps.LatLng(31.4207896511,119.4970035553),
			        new qq.maps.LatLng(31.4160469419,119.4954371452),
			        new qq.maps.LatLng(31.4168892939,119.4890642166),
			        new qq.maps.LatLng(31.4224010189,119.4886136055),
			        new qq.maps.LatLng(31.4243419479,119.4842147827),
			        new qq.maps.LatLng(31.4278574907,119.4881200790),
			        new qq.maps.LatLng(31.4287729750,119.4922399521),
			        new qq.maps.LatLng(31.4324714406,119.5211219788)
		    	],
		    	
		    	[
		    		new qq.maps.LatLng(31.4434927349,119.4526290894),
        			new qq.maps.LatLng(31.4358768293,119.4788503647),
        			new qq.maps.LatLng(31.4274180551,119.4768333435),
        			new qq.maps.LatLng(31.4256969123,119.4812536240),
        			new qq.maps.LatLng(31.4161751264,119.4770908356),
        			new qq.maps.LatLng(31.4160146147,119.4739151001),
        			new qq.maps.LatLng(31.4051872492,119.4709539413),
        			new qq.maps.LatLng(31.4047110788,119.4782495499),
        			new qq.maps.LatLng(31.4009382584,119.4771766663),
        			new qq.maps.LatLng(31.3903515741,119.4785928726),
        			new qq.maps.LatLng(31.3880802268,119.5066595078)
		    	],
		    	[
		    		new qq.maps.LatLng(31.4468611111,119.4800949097),
			        new qq.maps.LatLng(31.4393553245,119.4819831848),
			        new qq.maps.LatLng(31.4358768293,119.4788503647),
			        new qq.maps.LatLng(31.4274180551,119.4768333435),
			        new qq.maps.LatLng(31.4256969123,119.4812536240),
			        new qq.maps.LatLng(31.4243419479,119.4842147827),
			        new qq.maps.LatLng(31.4278574907,119.4881200790),
			        new qq.maps.LatLng(31.4287729750,119.4922399521),
			        new qq.maps.LatLng(31.4324714406,119.5211219788)
		    	],
		    	[
		    		new qq.maps.LatLng(31.4094360476,119.5143842697),
			        new qq.maps.LatLng(31.4207896511,119.4970035553),
			        new qq.maps.LatLng(31.4160469419,119.4954371452),
			        new qq.maps.LatLng(31.4168892939,119.4890642166),
			        new qq.maps.LatLng(31.4224010189,119.4886136055),
			        new qq.maps.LatLng(31.4243419479,119.4842147827)
		    	],
		    	[
		    		new qq.maps.LatLng(31.4469343354,119.4918966293),
			        new qq.maps.LatLng(31.4347050966,119.4917249680),
			        new qq.maps.LatLng(31.4352909648,119.4893646240),
			        new qq.maps.LatLng(31.4312996653,119.4889783859),
			        new qq.maps.LatLng(31.4287729750,119.4922399521)
		    	],
		    	[
		    		new qq.maps.LatLng(31.4047110788,119.4782495499),
			        new qq.maps.LatLng(31.4018540054,119.5112943649)
		    	],
		    ];
		    var points = [
		    	new qq.maps.LatLng(31.4227700000,119.4700900000),
		    	new qq.maps.LatLng(31.4314400000,119.4846400000),
		    	new qq.maps.LatLng(31.4342000000,119.4927600000),
		    	new qq.maps.LatLng(31.4223500000,119.4900200000),
		    	new qq.maps.LatLng(31.4115600000,119.4834600000),
		    	new qq.maps.LatLng(31.4470716306,119.4671237469),
		    	new qq.maps.LatLng(31.3978600000,119.4988400000),
		    	new qq.maps.LatLng(31.4319500000,119.5149300000),
		    	
		    ];
		    var labels = [];
		    var schools = [
		    	"省溧中附属中学","光华初中(二中)","光华初中(北沿河)","实验初中(平陵路)","燕山中学(台港路)","第四中学","燕山中学(燕湖)","实验初中(五中)"
		    ];
		    var titles = [
		    	"省溧中附属中学","光华初中二中校区","光华初中北沿河校区","实验初中平陵路校区","燕山中学台港路校区","溧阳市第四中学","燕山中学燕湖校区","实验初中五中校区"
		    ];
		    var contents = [
		    	"东面：清溪路（濑江桥）－清溪中路－清溪南路以西；北面：清溪路（濑江桥）－南河以南（含原清安乡地块生源）。","东面：人民路（东风桥）－竹墅桥－和平北路（和平桥）－花园路－图塘路－银梧路以西；南面：平陵中路以北；西面：清溪路（清安桥）—凤凰路（凤凰东桥）—丹金溧漕河以东（含胥渚、宋庄社区的失地农民生）。","南面：东大街（东风桥）—东升路（双号）以北；西面：人民路（东风桥）—和平北路（和平桥）—花园路—图塘路—银梧路以东（含昆仑花园四区18—25幢，昆仑南路136—298双号、187—445单号；前棠社区、棠下社区、徐格笪村委、毛场村委、昆仑村委、夏庄村委失地农民生）。","北面：西大街—东大街（单号）—东升路（单号）以南；南面：平陵中路（1-309单号、2-232双号）—钱家路（1-21单号、2-46双号）—燕园路—昆仑南路（昆仑南路1—185单号、2—134双号）—平陵东路（双号）以北（含南大街1-119单号、2-200双号）。","南面：永平大道（G104）以北；西面：清溪南路—南环西路—天目路以东；北面：平陵中路—钱家路—燕园路—昆仑南路—平陵东路（单号）以南。","东面：清溪路（濑江桥）—凤凰路（凤凰东桥）—丹金溧漕河以西；南面：南河以北（含原泓口乡地块生源）。","南面：燕城大道以北；西面：燕山南路以东；北面：永平大道（G104）以南。","原马垫乡地块生源。"
		    ];
		    var colors = [
		    	"#dcd9ea","deedd6","#fee4c3","#fcc9dc","#fffddc"
		    ];
		    for(i=0;i<path.length;i++){
		    	if(i > 4 && i <8){
		    		var polyline = new qq.maps.Polyline({
				        path: path[i],
		//			        strokeColor: '#eb646a',
//						fillColor: qq.maps.Color.fromHex("#FFFFFF",0.5),
				        strokeWeight: 2,
				        editable:false,
				        strokeDashStyle:'solid',
						strokeColor: '#79706b',
				        map: map
				    });
		    	}else if(i <= 4){
		    		var polyline = new qq.maps.Polygon({
				        path: path[i],
	//			        strokeColor: '#eb646a',
						fillColor: qq.maps.Color.fromHex(colors[i],0.6),
	//			        strokeWeight: 2,
	//			        editable:false,
						strokeColor: new qq.maps.Color(0, 0, 0, 0),
				        map: map
				    });
		    	}else{
		    		var polyline = new qq.maps.Polyline({
				        path: path[i],
		//			        strokeColor: '#eb646a',
//						fillColor: qq.maps.Color.fromHex("#FFFFFF",0.5),
				        strokeWeight: 2,
				        editable:false,
				        strokeDashStyle:'dash',
						strokeColor: '#79706b',
				        map: map
				    });
		    	}
		    	
		    }
		    for(i=0;i<points.length;i++){
		    	var marker = new qq.maps.Marker({
		    		position: points[i],
		    		map: map
		    	});
		    	cssA = {
		    		color: "#1A1C1B",
		    		fontSize: "12px",
		    		fontWeight: "bold",
		    		background:'#fff',
		    		opacity:'0.9',
		    		padding: "3px 5px",
		    		border:0,
		    		lineHeight:"1.4",
		    		borderRadius: "4px"
		    	},
		    	offsetA= new qq.maps.Size(15, -23);
		    	labels[i] = new qq.maps.Label({
		    		position :points[i],
		    		map: map,
		    		content: schools[i],
		    		style: cssA,
		    		offset: offsetA
		    	}),
		    	markerIcon = new qq.maps.MarkerImage('../../images/icon/school.svg');
		    	marker.setIcon(markerIcon);
		    	(function(n){
		    		qq.maps.event.addListener(labels[n],'click',function(){
			    		var html = '<div id="alert-box">' +
										'<div>' +
											'<div class="content-box">'+
												'<img src="../../images/schools/middle-' + n + '.jpg">'+
												'<div class="content">学区学校：' + titles[n] +  '<br>学区范围：' + contents[n] + '</div>' +
											'</div>'+
											'<div class="close-box">' +
												'<img src="../../images/icon/close-1.png" class="close-icon">'+
											'</div>' +
										'</div>'+	
									'</div>';
						document.getElementById("box").innerHTML = html;
//						var cssB = {
//							color: "#fff",
//				    		fontSize: "12px",
//				    		background: "#43ac45",
//				    		padding: "0 2px",
//				    		borderRadius: "4px",
//				    		border: "0"
//						};
//						for(var j=0;j<points.length;j++){
//							if(j != n){
//								labels[j].setStyle(cssA);
//							}
//						}
//						labels[n].setStyle(cssB);
			    	});
		    	})(i);
		    	
		    }
		    $("#box").delegate('.close-icon','tap',function(){
		    	$("#box").empty();
		    })
		    
	    });	
	</script>
</body>

</html>